package com.report.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.report.dto.request.MemberUploadReq;
import com.report.dto.response.MemberUploadRes;
import com.report.service.MemberUploadService;
import com.zmh.framework.config.BaseCommonInterface;
import com.zmh.framework.util.Result;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

/**
 * @author summer
 * @version 1.0
 * @date 2024/8/8 21:58
 */
@RestController
@RequestMapping(value = "/memberUpload")
@AllArgsConstructor
public class MemberUploadController implements BaseCommonInterface<MemberUploadReq, MemberUploadRes> {

    private final MemberUploadService memberUploadService;

    @Override
    public Result<String> save(@Valid MemberUploadReq memberUploadReq) {
        return null;
    }

    @Override
    public Result<String> del(Integer integer) {
        return null;
    }

    @Override
    public Result<Page<MemberUploadRes>> lists(MemberUploadReq memberUploadReq) {
        return Result.successResult(memberUploadService.lists(memberUploadReq));
    }

    @Override
    public Result<MemberUploadRes> findById(Integer integer) {
        return null;
    }

    @Override
    public Result<String> batchDel(List<MemberUploadRes> list) {
        return null;
    }

    @GetMapping(value = "/wareFile/{id}")
    public Result<String> wareFile(@PathVariable Integer id) {
        memberUploadService.wareFile(id);
        return Result.successResult();
    }
}
